package com.ib.algokit.forex;

import java.util.List;

import org.apache.log4j.Logger;

public class ForexHistoryAnalyzer {
	public static void main(String[] args){
//		analyzeForexHistoryFromFile();
//		optimizeAltPercChangeRanges();
//      optimizeDeviations();
	}
	
	public static Logger log = Logger.getLogger(ForexHistoryAnalyzer.class);


	
	public static double calculateAverage(List<Double> longProfitPercChanges){
		int numberOfValues=longProfitPercChanges.size();
		double avgValue=0;		
		if(numberOfValues!=0){
			for(double longProfitPercChange:longProfitPercChanges){
				avgValue+=longProfitPercChange;
			}
			avgValue=avgValue/(double)numberOfValues;
		}
		return avgValue;
	}

}
